1. Field of the Invention
The disclosure relates to a method and a network device for packet content translation.
2. Description of the Prior Art
In general, in a Virtual Local Area Network (VLAN), when the conventional packet content translation method selects a new Virtual Identification (VID) such as a Service Tag Virtual Identification (S-VID) or a Customer Tag Virtual Identification (C-VID), the new VID is usually a fixed value which is configured in advance.
Please refer to FIG. 1. FIG. 1 shows a packet content translation criteria table utilized by the conventional packet content translation method. As shown in FIG. 1, if a packet's C-VID is 10, it will match a first entry in the packet content translation criteria table, and the conventional packet content translation method will translate the C-VID “10” of the packet to be a S-VID 110″. If another packet's C-VID is 11, it will match a second entry in the packet content translation criteria table, and the conventional packet content translation method will translate the C-VID “11” of the packet to be a S-VID 111″. Since every VID has to occupy an entry, the more VID are required in the VLAN, the more resources are required. In other words, the conventional packet content translation method has a very high requirement for resources in network equipments.